package com.moleq.dialog;

import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.moleq.base.MoleQBaseDialog;
import com.moleq.mgpos.activities.R;

public class FuncSelectionDialog extends MoleQBaseDialog {

	private Button btnItemDnt;
	private Button btnCancel;
	private Button btnNoSale;
	private Button btnBack;

	private Button btnVoid;
	private Button btnErrorCorrect;
	private Button btnTaxExempt;
	private Button btnDiscount;
	private Button btnCoupon;
	private Button btnTare;
	private Button btnRefund;
	private Button btnPriceChange;
	private Button btnShift;

	public FuncSelectionDialog(Context context) {
		super(context, R.style.dialog, context);
		mContext = context;
		// TODO Auto-generated constructor stub
	}

	public FuncSelectionDialog(Context context, int theme) {
		super(context, theme);
		mContext = context;
		// TODO Auto-generated constructor stub
	}

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		this.setContentView(R.layout.dialog_function_selection);
		this.setCancelable(false);

		btnItemDnt = (Button) findViewById(R.id.buttonItemDiscount);
		btnItemDnt.setOnClickListener(mOnClickListener);

		btnCancel = (Button) findViewById(R.id.buttonCancel);
		btnCancel.setOnClickListener(mOnClickListener);

		btnNoSale = (Button) findViewById(R.id.buttonNoSale);
		btnNoSale.setOnClickListener(mOnClickListener);

		btnBack = (Button) findViewById(R.id.buttonFuncSelectionClose);
		btnBack.setOnClickListener(mOnClickListener);

		btnVoid = (Button) findViewById(R.id.buttonFuncVoid);
		btnVoid.setOnClickListener(mOnClickListener);

		btnErrorCorrect = (Button) findViewById(R.id.buttonFuncErrorCorrect);
		btnErrorCorrect.setOnClickListener(mOnClickListener);

		btnTaxExempt = (Button) findViewById(R.id.buttonFuncTaxExempt);
		btnTaxExempt.setOnClickListener(mOnClickListener);

		btnDiscount = (Button) findViewById(R.id.buttonFuncDiscount);
		btnDiscount.setOnClickListener(mOnClickListener);

		btnCoupon = (Button) findViewById(R.id.buttonFuncCoupon);
		btnCoupon.setOnClickListener(mOnClickListener);

		btnTare = (Button) findViewById(R.id.buttonFuncTare);
		btnTare.setOnClickListener(mOnClickListener);

		btnRefund = (Button) findViewById(R.id.buttonRefund);
		btnRefund.setOnClickListener(mOnClickListener);
		
		btnPriceChange = (Button) findViewById(R.id.buttonFuncPriceChange);
		btnPriceChange.setOnClickListener(mOnClickListener);
		
		btnShift = (Button)findViewById(R.id.buttonFuncShift);
		btnShift.setOnClickListener(mOnClickListener);
	}

	public void show() {
		super.show();
		
	}

	private Button.OnClickListener mOnClickListener = new Button.OnClickListener() {

		@Override
		public void onClick(View v) {
			onCloseWithReturn(v.getId(), "");

		}

	};

}
